home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BCI NET
/
BCI NET Dec 94.iso
/
archives
/
programming
/
blitzbasic
/
riblitzlibs.lha
/
riblitzlibs
/
reqlib
/
Req_Library.doc
next >
Wrap
Text File
|
1980-01-03
|
7KB
|
170 lines
;------------------------------
;- ReqLib.library version 0.9 -
;- ©1994 Reflective Images -
;------------------------------
The well known Req.Library for the Amiga is one of the best file requesters
around, so I wrote this small lib to enable Blitz users to have Req
requesters in their programs with the minimum of hassle.
* PLEASE NOTE * That this library must have at least v2.2 of the Req.Library
available.
Command List:
ReqOutput()
ReqFileRequest()
ReqFileLoc()
Statement: ReqOutput
------------------------------------------------------------------------------
Modes : Amiga
Syntax : ReqOutput windownumber
This command sets the ReqLib.library to put all requesters onto the
window specified by <windownumber>. If this command is not called
then the requesters will appear on the Default Public Screen.
Function: ReqFileRequest
------------------------------------------------------------------------------
Modes : Amiga
Syntax : pathname$=ReqFileRequest([title$[,flags]])
This opens up the standard file requester. If <title$> is given then
the text will appear on the requester title bar.
The optional <flags> parameter specifies a flag setting (see below)
for use. If this is omitted then the last flag setting is used.
Function: ReqFileLoc
------------------------------------------------------------------------------
Modes : Amiga/Blitz
Syntax : memorylocation.l=ReqFileLoc
This simply returns the address in memory where the Req.Library file requester
stucture is located.
FLAGS
=====
Below is a list of possible flag settings and a brief description of each.
#FRQSHOWINFOB = %1 ;Set to show .info files. Default is not.
#FRQEXTSELECTB = %10 ;Extended select. Default is not.
#FRQCACHINGB = %100 ;Directory caching. Default is not.
#FRQGETFONTSB = %1000 ;Font requester rather than a file requester.
#FRQINFOGADGETB = %10000 ;Hide-info files gadget.
#FRQHIDEWILDSB = %100000 ;DON'T want 'show' and 'hide' string gadgets.
#FRQABSOLUTEXYB = %1000000 ;Use absolute x,y positions rather than centering on mouse.
#FRQCACHEPURGEB = %10000000 ;Purge the cache whenever the directory date stamp changes if this is set.
#FRQNOHALFCACHEB = %100000000 ;Don't cache a directory unless it is completely read in when this is set.
#FRQNOSORTB = %1000000000 ;DON'T want sorted directories.
#FRQNODRAGB = %10000000000 ;DON'T want a drag bar and depth gadgets.
#FRQSAVINGB = %100000000000 ;Are selecting a file to save to.
#FRQLOADINGB = %1000000000000 ;Are selecting a file(s) to load from.
#FRQDIRONLYB = %10000000000000 ;Allow the user to select a directory, rather than a file.
STRUCTURE
=========
Below is a description of the Req.Library file requester structure.
STRUCTURE AFileRequester,0
UWORD frq_VersionNumber ;MUST BE REQVERSION!!!!!!!!!!!!!!!!!!
;You will probably want to initialize these three variables.
APTR frq_Title ; Hailing text
APTR frq_Dir ; Directory array (must be DSIZE+1 characters long)
APTR frq_File ; Filename array (must be FCHARS+1 characters long)
;If you initialize this variable then the file requester will place the complete path name in here on exit.
APTR frq_PathName ; Complete path name array - (must be DSIZE+FCHARS+2 long)
;If you want the file requester to pop up on your custom screen, put one of your window pointers here.
;Or better yet, you can leave this field zeroed and put a pointer to one of your windows in the
;pr_WindowPtr field in your process structure.
APTR frq_Window ; Window requesting or NULL
;Initialize these to the number of lines and columns you want to appear in the inner window that
;displays the file names. If you leave these set to zero then default values will be used.
UWORD frq_MaxExtendedSelect ; Zero implies a maximum of 65535, as long as FRQEXTSELECT is set.
UWORD frq_numlines ; Number of lines in file window.
UWORD frq_numcolumns ; Number of columns in file window.
UWORD frq_devcolumns ; Number of columns in device window.
ULONG frq_Flags ; Various - umm - flags. See above for more info.
UWORD frq_dirnamescolor ;These five colors will all default
UWORD frq_filenamescolor ;to color one if you don't specify
UWORD frq_devicenamescolor ;a color (ie; if you specify color zero).
UWORD frq_fontnamescolor ;If you want color zero to be used, specify
UWORD frq_fontsizescolor ;color 32, or some other too large number
;which mods down to zero.
UWORD frq_detailcolor ;If both of these colors are specified as
UWORD frq_blockcolor ;zero then the block pen will be set to one.
UWORD frq_gadgettextcolor ;The color for the text of the five boolean gadgets. Defaults to 1.
UWORD frq_textmessagecolor ;The color for the message at the screen top. Defaults to 1.
UWORD frq_stringnamecolor ;The color for the words Drawer, File, Hide and Show. Defaults to 3.
UWORD frq_stringgadgetcolor ;The color for the borders of the string gadgets. Defaults to 3.
;Unfortunately it is not possible to specify
;the color of the actual text in an Intuition
;string gadget.
UWORD frq_boxbordercolor ;The color for the boxes around the file and directory areas. Defaults to 3.
UWORD frq_gadgetboxcolor ;The color for the boxes around the five boolean gadgets. Defaults to 3.
STRUCT frq_RFU_Stuff,36 ;This area, which is reserved for
;future use, should all be zero.
STRUCT frq_DirDateStamp,ds_SIZEOF ; A copy of the cached directories date stamp.
; There should never be any need to change this.
UWORD frq_WindowLeftEdge; ;These two fields are only used when the
UWORD frq_WindowTopEdge; ;FRQABSOLUTEXY flag is set. They specify
;the location of the upper left hand
;corner of the window.
UWORD frq_FontYSize ;These fields are used to return the selected
UWORD frq_FontStyle ;font size and style, only applicable when the
;font bit is set.
;If you set the extended select bit and the user extended selects, the list of filenames will start from here.
APTR frq_ExtendedSelect ; Linked list of ESStructures if more than one filename is chosen.
;All of the following variables you shouldn't need to touch. They contain fields that the file
;requester sets and likes to preserve over calls, just to make life easier for the user.
STRUCT frq_Hide,WILDLENGTH+2 ; Wildcards for files to hide.
STRUCT frq_Show,WILDLENGTH+2 ; Wildcards for files to show.
WORD frq_FileBufferPos ; Cursor's position and first
WORD frq_FileDispPos ; displayed character number in
WORD frq_DirBufferPos ; the three string gadgets. No
WORD frq_DirDispPos ; need to initialized these if
WORD frq_HideBufferPos ; you don't want to.
WORD frq_HideDispPos
WORD frq_ShowBufferPos
WORD frq_ShowDispPos
; The following fields are PRIVATE! Don't go messing with them or
; wierd things may/will happen. If this isn't enough of a warning, go read
; the one in intuition.h, that should scare you off.
APTR frq_Memory ; Memory allocated for dir entries.
APTR frq_Memory2 ; Used for currently hidden files.
APTR frq_Lock ; Contains lock on directories being read across calls.
STRUCT frq_PrivateDirBuffer,DSIZE+2 ; Used for keeping a record of which
; directory we have file names for.
APTR frq_FileInfoBlock
WORD frq_NumEntries
WORD frq_NumHiddenEntries
WORD frq_filestartnumber
WORD frq_devicestartnumber
LABEL frq_SIZEOF
Enjoy!
Steve.